<?php
/**
 * CampaignMutationErrorSelector
 *
 * PHP version 5
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */

/**
 * Sponsored Brands campaign management
 *
 * Create and manage Sponsored Brands campaigns.   To learn more about Sponsored Brands campaigns, see:   - [Sponsored Brands overview](guides/sponsored-brands/overview)  - [Sponsored Brands campaign structure](guides/sponsored-brands/campaigns/structure)  - [Get started with Sponsored Brands campaigns](guides/sponsored-brands/campaigns/get-started-with-campaigns)
 *
 * OpenAPI spec version: 4.0
 * 
 * Generated by:https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api.git
 * AmazonAdvertisingApi Codegen version: 3.0.51
 */
/**
 * NOTE: This class is auto generated by the AmazonAdvertisingApi code generator program.
 *https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 * Do not edit the class manually.
 */

namespace AmazonAdvertisingApi\Model;

use \ArrayAccess;
use \AmazonAdvertisingApi\ObjectSerializer;

/**
 * CampaignMutationErrorSelector Class Doc Comment
 *
 * @category Class
 * @package  AmazonAdvertisingApi
 * @author   vv_guo
 * @link    https://gitee.com/HuaLiLiDeDiDiao/amazon-advertising-api
 */
class CampaignMutationErrorSelector implements ModelInterface, ArrayAccess
{
    const DISCRIMINATOR = null;

    /**
      * The original name of the model.
      *
      * @var string
      */
    protected static $AmazonAdvertisingApiModelName = 'CampaignMutationErrorSelector';

    /**
      * Array of property to type mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiTypes = [
        'date_error' => '\AmazonAdvertisingApi\Model\DateError',
        'bidding_error' => '\AmazonAdvertisingApi\Model\BiddingError',
        'budget_error' => '\AmazonAdvertisingApi\Model\BudgetError',
        'billing_error' => '\AmazonAdvertisingApi\Model\BillingError',
        'range_error' => '\AmazonAdvertisingApi\Model\RangeError',
        'other_error' => '\AmazonAdvertisingApi\Model\OtherError'
    ];

    /**
      * Array of property to format mappings. Used for (de)serialization
      *
      * @var string[]
      */
    protected static $AmazonAdvertisingApiFormats = [
        'date_error' => null,
        'bidding_error' => null,
        'budget_error' => null,
        'billing_error' => null,
        'range_error' => null,
        'other_error' => null
    ];

    /**
     * Array of property to type mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiTypes()
    {
        return self::$AmazonAdvertisingApiTypes;
    }

    /**
     * Array of property to format mappings. Used for (de)serialization
     *
     * @return array
     */
    public static function AmazonAdvertisingApiFormats()
    {
        return self::$AmazonAdvertisingApiFormats;
    }

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @var string[]
     */
    protected static $attributeMap = [
        'date_error' => 'dateError',
        'bidding_error' => 'biddingError',
        'budget_error' => 'budgetError',
        'billing_error' => 'billingError',
        'range_error' => 'rangeError',
        'other_error' => 'otherError'
    ];

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @var string[]
     */
    protected static $setters = [
        'date_error' => 'setDateError',
        'bidding_error' => 'setBiddingError',
        'budget_error' => 'setBudgetError',
        'billing_error' => 'setBillingError',
        'range_error' => 'setRangeError',
        'other_error' => 'setOtherError'
    ];

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @var string[]
     */
    protected static $getters = [
        'date_error' => 'getDateError',
        'bidding_error' => 'getBiddingError',
        'budget_error' => 'getBudgetError',
        'billing_error' => 'getBillingError',
        'range_error' => 'getRangeError',
        'other_error' => 'getOtherError'
    ];

    /**
     * Array of attributes where the key is the local name,
     * and the value is the original name
     *
     * @return array
     */
    public static function attributeMap()
    {
        return self::$attributeMap;
    }

    /**
     * Array of attributes to setter functions (for deserialization of responses)
     *
     * @return array
     */
    public static function setters()
    {
        return self::$setters;
    }

    /**
     * Array of attributes to getter functions (for serialization of requests)
     *
     * @return array
     */
    public static function getters()
    {
        return self::$getters;
    }

    /**
     * The original name of the model.
     *
     * @return string
     */
    public function getModelName()
    {
        return self::$AmazonAdvertisingApiModelName;
    }



    /**
     * Associative array for storing property values
     *
     * @var mixed[]
     */
    protected $container = [];

    /**
     * Constructor
     *
     * @param mixed[] $data Associated array of property values
     *                      initializing the model
     */
    public function __construct(array $data = null)
    {
        $this->container['date_error'] = isset($data['date_error']) ? $data['date_error'] : null;
        $this->container['bidding_error'] = isset($data['bidding_error']) ? $data['bidding_error'] : null;
        $this->container['budget_error'] = isset($data['budget_error']) ? $data['budget_error'] : null;
        $this->container['billing_error'] = isset($data['billing_error']) ? $data['billing_error'] : null;
        $this->container['range_error'] = isset($data['range_error']) ? $data['range_error'] : null;
        $this->container['other_error'] = isset($data['other_error']) ? $data['other_error'] : null;
    }

    /**
     * Show all the invalid properties with reasons.
     *
     * @return array invalid properties with reasons
     */
    public function listInvalidProperties()
    {
        $invalidProperties = [];

        return $invalidProperties;
    }

    /**
     * Validate all the properties in the model
     * return true if all passed
     *
     * @return bool True if all properties are valid
     */
    public function valid()
    {
        return count($this->listInvalidProperties()) === 0;
    }


    /**
     * Gets date_error
     *
     * @return \AmazonAdvertisingApi\Model\DateError
     */
    public function getDateError()
    {
        return $this->container['date_error'];
    }

    /**
     * Sets date_error
     *
     * @param \AmazonAdvertisingApi\Model\DateError $date_error date_error
     *
     * @return $this
     */
    public function setDateError($date_error)
    {
        $this->container['date_error'] = $date_error;

        return $this;
    }

    /**
     * Gets bidding_error
     *
     * @return \AmazonAdvertisingApi\Model\BiddingError
     */
    public function getBiddingError()
    {
        return $this->container['bidding_error'];
    }

    /**
     * Sets bidding_error
     *
     * @param \AmazonAdvertisingApi\Model\BiddingError $bidding_error bidding_error
     *
     * @return $this
     */
    public function setBiddingError($bidding_error)
    {
        $this->container['bidding_error'] = $bidding_error;

        return $this;
    }

    /**
     * Gets budget_error
     *
     * @return \AmazonAdvertisingApi\Model\BudgetError
     */
    public function getBudgetError()
    {
        return $this->container['budget_error'];
    }

    /**
     * Sets budget_error
     *
     * @param \AmazonAdvertisingApi\Model\BudgetError $budget_error budget_error
     *
     * @return $this
     */
    public function setBudgetError($budget_error)
    {
        $this->container['budget_error'] = $budget_error;

        return $this;
    }

    /**
     * Gets billing_error
     *
     * @return \AmazonAdvertisingApi\Model\BillingError
     */
    public function getBillingError()
    {
        return $this->container['billing_error'];
    }

    /**
     * Sets billing_error
     *
     * @param \AmazonAdvertisingApi\Model\BillingError $billing_error billing_error
     *
     * @return $this
     */
    public function setBillingError($billing_error)
    {
        $this->container['billing_error'] = $billing_error;

        return $this;
    }

    /**
     * Gets range_error
     *
     * @return \AmazonAdvertisingApi\Model\RangeError
     */
    public function getRangeError()
    {
        return $this->container['range_error'];
    }

    /**
     * Sets range_error
     *
     * @param \AmazonAdvertisingApi\Model\RangeError $range_error range_error
     *
     * @return $this
     */
    public function setRangeError($range_error)
    {
        $this->container['range_error'] = $range_error;

        return $this;
    }

    /**
     * Gets other_error
     *
     * @return \AmazonAdvertisingApi\Model\OtherError
     */
    public function getOtherError()
    {
        return $this->container['other_error'];
    }

    /**
     * Sets other_error
     *
     * @param \AmazonAdvertisingApi\Model\OtherError $other_error other_error
     *
     * @return $this
     */
    public function setOtherError($other_error)
    {
        $this->container['other_error'] = $other_error;

        return $this;
    }
    /**
     * Returns true if offset exists. False otherwise.
     *
     * @param integer $offset Offset
     *
     * @return boolean
     */
    #[\ReturnTypeWillChange]
    public function offsetExists($offset)
    {
        return isset($this->container[$offset]);
    }

    /**
     * Gets offset.
     *
     * @param integer $offset Offset
     *
     * @return mixed
     */
    #[\ReturnTypeWillChange]
    public function offsetGet($offset)
    {
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }

    /**
     * Sets value based on offset.
     *
     * @param integer $offset Offset
     * @param mixed   $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }

    /**
     * Unsets offset.
     *
     * @param integer $offset Offset
     *
     * @return void
     */
    #[\ReturnTypeWillChange]
    public function offsetUnset($offset)
    {
        unset($this->container[$offset]);
    }

    /**
     * Gets the string presentation of the object
     *
     * @return string
     */
    public function __toString()
    {
        if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
            return json_encode(
                ObjectSerializer::sanitizeForSerialization($this),
                JSON_PRETTY_PRINT
            );
        }

        return json_encode(ObjectSerializer::sanitizeForSerialization($this));
    }
}
